package es.aa.android.cartomatic.customview;

import es.aa.android.cartomatic.R;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;

public class mButtonsHeader extends RelativeLayout {

	private Button buttonCreate;
	private Button buttonShowAll;
	
	public mButtonsHeader(Context context) {
		super(context);
		init(context);
	}
	
	public mButtonsHeader(Context context, AttributeSet attrs) {
		super(context, attrs);
		init(context);
	}
	
	public mButtonsHeader(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
		init(context);
	}
	
	private void init(Context context) {
		LayoutInflater.from(context).inflate(R.layout.buttons_header, this, true);
		
		buttonCreate = (Button) findViewById(R.id.buttonHeaderCreate);
		buttonShowAll = (Button) findViewById(R.id.buttonHeaderShowAll);
		
	}
	
	public void setOnCreateClickList(View.OnClickListener listener) {
		buttonCreate.setOnClickListener(listener);
	}
	
	public void setOnShowClickList(View.OnClickListener listener) {
		buttonShowAll.setOnClickListener(listener);
	}
	

}
